# Copyright 2023 Ant Group Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

package(default_visibility = ["//visibility:public"])

cc_library(
    name = "flags",
    srcs = ["flags.cc"],
    hdrs = ["flags.h"],
    deps = [
        "@com_github_gflags_gflags//:gflags",
    ],
)

cc_binary(
    name = "scqlengine",
    srcs = [
        "main.cc",
        "version.h",
    ],
    linkopts = ["-pie"],
    deps = [
        "//engine/auth:authenticator",
        "//engine/datasource:http_router",
        "//engine/datasource:kuscia_datamesh_router",
        "//engine/link:mux_link_factory",
        "//engine/link:mux_receiver_service",
        "//engine/link:rpc_helper",
        "//engine/services:engine_service_impl",
        "//engine/services:error_collector_service_impl",
        "//engine/services:prometheus_service_impl",
        "//engine/util:logging",
        "//engine/util:prometheus_monitor",
        "//engine/exe:flags",
        "@com_github_brpc_brpc//:brpc",
        "@com_google_absl//absl/debugging:failure_signal_handler",
        "@com_google_absl//absl/debugging:symbolize",
    ],
)
